package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.OrderReservationMapper;
import com.ruoyi.system.domain.OrderReservation;
import com.ruoyi.system.service.IOrderReservationService;

/**
 * 订单-预约关联Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-06-03
 */
@Service
public class OrderReservationServiceImpl implements IOrderReservationService 
{
    @Autowired
    private OrderReservationMapper orderReservationMapper;

    /**
     * 查询订单-预约关联
     * 
     * @param id 订单-预约关联主键
     * @return 订单-预约关联
     */
    @Override
    public OrderReservation selectOrderReservationById(Long id)
    {
        return orderReservationMapper.selectOrderReservationById(id);
    }

    /**
     * 查询订单-预约关联列表
     * 
     * @param orderReservation 订单-预约关联
     * @return 订单-预约关联
     */
    @Override
    public List<OrderReservation> selectOrderReservationList(OrderReservation orderReservation)
    {
        return orderReservationMapper.selectOrderReservationList(orderReservation);
    }

    /**
     * 新增订单-预约关联
     * 
     * @param orderReservation 订单-预约关联
     * @return 结果
     */
    @Override
    public int insertOrderReservation(OrderReservation orderReservation)
    {
        orderReservation.setCreateTime(DateUtils.getNowDate());
        return orderReservationMapper.insertOrderReservation(orderReservation);
    }

    /**
     * 修改订单-预约关联
     * 
     * @param orderReservation 订单-预约关联
     * @return 结果
     */
    @Override
    public int updateOrderReservation(OrderReservation orderReservation)
    {
        orderReservation.setUpdateTime(DateUtils.getNowDate());
        return orderReservationMapper.updateOrderReservation(orderReservation);
    }

    /**
     * 批量删除订单-预约关联
     * 
     * @param ids 需要删除的订单-预约关联主键
     * @return 结果
     */
    @Override
    public int deleteOrderReservationByIds(Long[] ids)
    {
        return orderReservationMapper.deleteOrderReservationByIds(ids);
    }

    /**
     * 删除订单-预约关联信息
     * 
     * @param id 订单-预约关联主键
     * @return 结果
     */
    @Override
    public int deleteOrderReservationById(Long id)
    {
        return orderReservationMapper.deleteOrderReservationById(id);
    }
}
